package com.wenhai.spring.dependency.injection;

import com.wenhai.xiaomage.spring.ioc.overview.dependency.domain.SuperUser;
import com.wenhai.xiaomage.spring.ioc.overview.dependency.domain.User;

/**
 * @Author:wenhai
 * @Description: Class中IsIntance方法示例
 * @Date:2020/3/29
 */
public class IsInstanceMethodOfClassDemo {
    public static void main(String[] args) {
        User user = new User();
        System.out.println(User.class.isAssignableFrom(SuperUser.class));
        System.out.println(User.class.isInstance(user));
        System.out.println(user instanceof  User);
    }
}
